package com.cjjd.c.feature.mine.certify;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.cjjd.c.R;
import com.cjjd.c.base.ActionBarFragment;
import com.cjjd.c.utils.FragmentUtil;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * ----------------------------------
 * Created by xyd on 2017/8/14.
 * <p/>
 * 描  述： 申请认证
 * <p/>
 * 修订历史:
 * ----------------------------------
 */

public class CertifyFragment extends ActionBarFragment {
    @Bind(R.id.tv_certify_personal)
    TextView tvCertifyPersonal;
    @Bind(R.id.tv_certify_company)
    TextView tvCertifyCompany;

    @Override
    public Object getTitleString() {
        return "认证";
    }

    @Override
    public int getContentView() {
        return R.layout.fragment_certify;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick({R.id.tv_certify_personal, R.id.tv_certify_company})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tv_certify_personal:
                FragmentUtil.replaceWithAddToBack(mContext, new PersonalFragment(), R.id.activity_body);
                break;
            case R.id.tv_certify_company:
                FragmentUtil.replaceWithAddToBack(mContext, new CompanyFragment(), R.id.activity_body);
                break;
        }
    }
}
